home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
games
/
spassion
/
source.lzh
/
SOURCE
/
BGPUT.C
< prev
next >
Wrap
Text File
|
2000-03-25
|
1KB
|
63 lines
/*
* bgput.c( BG character&string output rountine )
*/
/*#include <iocslib.h>*/
#include <XSP2lib.H>
#include "SPASSION.H"
#include "BG.H"
/*
* 文字列を表示する
*/
void PutBGStr( short x, short y, char *cp, short info )
{
while( *cp != '\0' ) {
xsp_set( x+16 , y+16 , obj_moji+(*cp++)-0x20 , info );
x+=16;
}
}
/*
* 連続するキャラクタを表示する
*/
void PutBGChar( short x, short y, short *pt, short info )
{
while( *pt != -1 ) {
xsp_set( x+16 , y+16 , obj_moji+*pt++ , info );
x+=16;
}
}
/*
* PutBGVal0( page, x, y, color, num, keta )
* スプライトで num を keta で指定された桁数で右詰め表示する
* 足りない部分は0で埋まる
*
* short x; X座標
* short y; Y座標
* int num; 表示する数
* short keta; 桁数
* short info; 色、反転
*/
void PutBGVal0(short x, short y, int num, short keta, short info )
{
keta--;
do{
xsp_set( x+keta*16+16 , y+16 , obj_moji+(num % 10)+0x10 , info );
num /= 10;
}while( --keta >= 0 ) ;
/* }while( (num > 0) && (--keta >= 0) );*/ /* 0で埋めない */
}
/* PutBGVal0 の8ドット版*/
void PutBGVal8(short x, short y, int num, short keta, short info )
{
keta--;
do{
xsp_set( x+keta*8+16 , y+16 , obj_moji+(num % 10)+0x70 , info );
num /= 10;
}while( --keta >= 0 );
}